#ifndef _POINT_LIST_
#define _POINT_LIST_

#include "point.h"

typedef struct _PointList{
	long length;
	long capacity;
	Point ** points;
} PointList;

PointList * newPointList(int initCapacity);
void freePointList(PointList * pl);

void addPoint(PointList * pl, Point * p);
void deletePoint(PointList * pl, int idx);

void sortPointList(PointList * pl);
void printPointList(PointList * pl);

//private 
void pointListQuickSort(PointList * pl, long left, long right);
void swap(Point * p1, Point * p2);

void printUsedPoints(PointList * pl);

int containsPoint(PointList * pl, Point * p);

#endif
